﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Reports/Report.Master" AutoEventWireup="true" CodeBehind="CumulativeTimeAvg.aspx.cs" Inherits="NPMonitor.Web.Reports.CumulativeTimeAvg" %>
<%@ Register src="../UserControls/ReportControl.ascx" tagname="ReportControl" tagprefix="uc1" %>
<%@ Register src="../UserControls/ReportTimePicker.ascx" tagname="ReportTimePicker" tagprefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="divSearchCondition">
    <div id="divTopBar"></div>
    <dl>
        <dd>
            <asp:HiddenField ID = "hfReportType" runat = "server" Value = "Daily" />
            <uc2:ReportTimePicker ID="rtpTimeSelector" runat="server" />
        </dd>
        <dd>
            <label>Location</label>
            <asp:DropDownList ID="ddlLocation" runat="server" ></asp:DropDownList>
            <asp:RequiredFieldValidator ID="rfvLocation" ControlToValidate="ddlLocation" ForeColor="Red" runat="server" ErrorMessage=""></asp:RequiredFieldValidator>
        </dd>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <dd>
                    <label>Case</label>
                    <asp:DropDownList ID="ddlCase" runat="server" AutoPostBack="true"
                        onselectedindexchanged="ddlCase_SelectedIndexChanged"></asp:DropDownList>
                    <asp:HiddenField ID="hfCaseName" runat="server" />
                    <asp:RequiredFieldValidator ID="rfvCase" ControlToValidate="ddlCase" runat="server" ForeColor="Red" ErrorMessage=""></asp:RequiredFieldValidator>
                </dd>
                <asp:PlaceHolder ID="phScenario" runat="server" Visible="false">
                    <dd>
                        <label>Scenario</label>
                        <asp:CheckBoxList runat="server" RepeatDirection="Horizontal" RepeatColumns="5" ID="chkScenario">
                        </asp:CheckBoxList>
                    </dd>
                </asp:PlaceHolder>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="ddlCase" EventName="SelectedIndexChanged" />
            </Triggers>
        </asp:UpdatePanel>
        <dd>
            <asp:Button ID="btnViewReport" runat="server" Text="View Report" CssClass="blueBTN" OnClick="btnViewReport_Click" />
        </dd>
    </dl>
    </div>
    <div>
        <uc1:ReportControl ID="ucReport" runat="server" />
    </div>

    <script type="text/javascript">
        var ddlLocation = $("#<%=ddlLocation.ClientID %>");
        var ddlCase = $("#<%=ddlCase.ClientID %>");
        var chkScenario = $("#<%=chkScenario.ClientID %>");

        var hfdReportType = $("#<%=hfReportType.ClientID%>");
        var hfCaseName = $("#<%=hfCaseName.ClientID %>")
        var hiddenfield = hfdReportType.val();

        $(function () {
        });
    </script>
</asp:Content>
